package com.x.client.bean

import android.os.Parcelable
import com.google.gson.annotations.SerializedName
import kotlinx.android.parcel.Parcelize

/**
 * Creator : GG
 * Date    : 2018/4/10
 * Mail    : gg.jin.yu@gmai.com
 * Explain :
 */

@Parcelize
data class Series(val brandName: String? = "",
                  val seriesName: String? = "",
                  @SerializedName("storageNum") var storageNum: Int? = 0, //2
                  val brandId: Int? = 0,
                  val brand: Brand? = Brand(),
                  val countryId: Int? = 0,
                  val seriesId: Int? = null,
                  val logo: Int? = 0,
                  var choose: Boolean = false) : Parcelable {
    override fun equals(other: Any?): Boolean {
        val item = other as Series
        return seriesId == item.seriesId
    }

    fun getSubscribeSeriesName(): String = "$brandName $seriesName"
    override fun hashCode(): Int {
        return seriesId ?: 0
    }

}


